<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="../head.jsp"/>
<title>信息工程学院成教管理系统-修改成绩信息</title>
</head>
<body>
	<div class="container">
	<jsp:include page="../menu.jsp"/>
		<div class="row">
			<div class="col-md-offset-5 col-md-2">
				<h3 class="text-center">修改成绩信息</h3>
			</div>
		</div>
	
		<div class="row">
			<div class="col-md-offset-2 col-md-6">
				<form class="form-horizontal" method="post" action="alterscore.do">
					
					<div class="form-group has-feedback">
						<div class="col-md-8">
							<input type="hidden" class="form-control" name="scoreid" value="${score.scoreid }" readonly>
						</div>
					</div>
				
					<div class="form-group has-feedback">
						<label class="col-sm-4 control-label">学号</label>
						<div class="col-md-8">
							<input type="text" class="form-control" name="sno" value="${score.student.sno }" readonly>
						</div>
					</div>

					<div class="form-group has-feedback">
						<label class="col-sm-4 control-label">姓名</label>
						<div class="col-md-8">
							<input type="text" class="form-control" name="sname" value="${score.student.sname }" readonly>
						</div>
					</div>
				
					<div class="form-group has-feedback">
						<label class="col-sm-4 control-label">所在班级</label>
						<div class="col-md-8">
						<select name="clazzname" class="form-control" readonly>
								<c:forEach items="${clazznames }" var="clazzname">
								<c:if test="${fn:contains(score.student.clazz.name,clazzname)}">
								<option selected = "selected" value="${student.clazz.no}">${clazzname}</option>
								</c:if>
								<c:if test="${fn:contains(score.student.clazz.name,clazzname)==false}">
								<option>${clazzname}</option>
								</c:if>	
								</c:forEach>				
							</select>							
						</div>
					</div>
					<div class="form-group has-feedback">
						<label class="col-sm-4 control-label">所在学院</label>
						<div class="col-md-8">
						<select name="college" class="form-control" readonly>								
								<c:forEach items="${clazzcolleges }" var="college">
								<c:if test="${fn:contains(score.student.clazz.college,college)}">
								<option selected = "selected">${college}</option>
								</c:if>
								<c:if test="${fn:contains(score.student.clazz.college,college)==false}">
								<option>${college}</option>
								</c:if>	
								</c:forEach>													
							</select>
						</div>
					</div>
					
					<div class="form-group has-feedback">
						<label class="col-sm-4 control-label">课程名</label>
						<div class="col-md-8">
							<input type="text" class="form-control" name="coursename" value="${score.course.coursename }" readonly>
						</div>
					</div>
				
					<div class="form-group has-feedback">
						<label class="col-sm-4 control-label">平时成绩</label>
						<div class="col-md-8">
							<input type="text" class="form-control" name="uscore" value="${score.uscore }">
						</div>
					</div>
				
					<div class="form-group has-feedback">
						<label class="col-sm-4 control-label">期末成绩</label>
						<div class="col-md-8">
							<input type="text" class="form-control" name="endscore" value="${score.endscore }">
						</div>
					</div>			
				
					<div class="form-group has-feedback">
						<label class="col-sm-4 control-label">总成绩</label>
						<div class="col-md-8">
							<input type="text" class="form-control" name="totalscore" value="${score.totalscore }">
						</div>
					</div>
				
					<div class="form-group has-feedback">
						<label class="col-sm-4 control-label">成绩等级</label>
						<div class="col-md-8">
							<input type="text" class="form-control" name="levelscore" value="${score.levelscore }">
						</div>
					</div>
					
					<div class="form-group has-feedback">
						<label class="col-sm-4 control-label">任课老师</label>
						<div class="col-md-8">
							<input type="text" class="form-control" name="levelscore" value="${score.course.coursename  }" readonly>
						</div>
					</div>
					<div class="form-group has-feedback">
						<label class="col-sm-4 control-label">学期</label>
						<div class="col-md-8">
							<input type="text" class="form-control" name="term" value="${score.course.term }" readonly>
						</div>
					</div>
					<div class="form-group">
						<div class="col-md-offset-6 col-md-4">
							<button type="submit" class="btn btn-default btn-primary btn-block">确认修改</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</body>
</html>